cmake_minimum_required(VERSION 2.8)
project(cppprogramming C CXX)

add_definitions(-Wall -O3)

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)

find_path(ARMADILLO_INCLUDE_DIR armadillo)
find_library(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options)
find_library(BOOST_FILESYSTEM_LIBRARY boost_filesystem)

include_directories(${PROJECT_SOURCE_DIR} ${ARMADILLO_INCLUDE_DIR})

#find_library(ARMADILLO_LIBRARY armadillo)
#find_library(LAPACK_LIBRARY lapack)
#find_library(BLAS_LIBRARY blas)
#message(STATUS "Armadillo at "${ARMADILLO_LIBRARY})
#message(STATUS "Boost program options at "${BOOST_PROGRAM_OPTIONS_LIBRARY})
#message(STATUS "Armadillo headers at "${ARMADILLO_INCLUDE_DIR})
#message(STATUS "LAPACK at "${LAPACK_LIBRARY})
#message(STATUS "BLAS at "${BLAS_LIBRARY})

subdirs(
  #helloworld
  #containers
  #comp_arch
  #online
  #tree
  #reginfomax
  #matching
  data
)

add_library(cppprogramming
  common/lognumber.cpp
)

set(PROJECT_LINK_LIBRARIES
  #armadillo
  ${BOOST_PROGRAM_OPTIONS_LIBRARY} #boost_program_options
  ${BOOST_FILESYSTEM_LIBRARY}
  lapack
  blas
  cppprogramming
)
